home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / attr / xattr.h < prev   
Encoding:
C/C++ Source or Header  |  2006-01-09  |  2.9 KB  |  77 lines

  1. /*
  2.  * Copyright (c) 2001-2002 Silicon Graphics, Inc.  All Rights Reserved.
  3.  * 
  4.  * This program is free software; you can redistribute it and/or modify it
  5.  * under the terms of version 2.1 of the GNU Lesser General Public License
  6.  * as published by the Free Software Foundation.
  7.  * 
  8.  * This program is distributed in the hope that it would be useful, but
  9.  * WITHOUT ANY WARRANTY; without even the implied warranty of
  10.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11.  * 
  12.  * Further, this software is distributed without any warranty that it is
  13.  * free of the rightful claim of any third person regarding infringement
  14.  * or the like.  Any license provided herein, whether implied or
  15.  * otherwise, applies only to this software file.  Patent licenses, if
  16.  * any, provided herein do not apply to combinations of this program with
  17.  * other software, or any other product whatsoever.
  18.  * 
  19.  * You should have received a copy of the GNU Lesser General Public
  20.  * License along with this program; if not, write the Free Software
  21.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
  22.  * USA.
  23.  * 
  24.  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
  25.  * Mountain View, CA  94043, or:
  26.  * 
  27.  * http://www.sgi.com 
  28.  * 
  29.  * For further information regarding this notice, see: 
  30.  * 
  31.  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  32.  */
  33. #ifndef __XATTR_H__
  34. #define __XATTR_H__
  35.  
  36. #include <features.h>
  37.  
  38. #include <errno.h>
  39. #ifndef ENOATTR
  40. # define ENOATTR ENODATA        /* No such attribute */
  41. #endif
  42.  
  43. #define XATTR_CREATE  0x1       /* set value, fail if attr already exists */
  44. #define XATTR_REPLACE 0x2       /* set value, fail if attr does not exist */
  45.  
  46.  
  47. __BEGIN_DECLS
  48.  
  49. extern int setxattr (const char *__path, const char *__name,
  50.               const void *__value, size_t __size, int __flags) __THROW;
  51. extern int lsetxattr (const char *__path, const char *__name,
  52.               const void *__value, size_t __size, int __flags) __THROW;
  53. extern int fsetxattr (int __filedes, const char *__name,
  54.               const void *__value, size_t __size, int __flags) __THROW;
  55.  
  56. extern ssize_t getxattr (const char *__path, const char *__name,
  57.                 void *__value, size_t __size) __THROW;
  58. extern ssize_t lgetxattr (const char *__path, const char *__name,
  59.                 void *__value, size_t __size) __THROW;
  60. extern ssize_t fgetxattr (int __filedes, const char *__name,
  61.                 void *__value, size_t __size) __THROW;
  62.  
  63. extern ssize_t listxattr (const char *__path, char *__list,
  64.                 size_t __size) __THROW;
  65. extern ssize_t llistxattr (const char *__path, char *__list,
  66.                 size_t __size) __THROW;
  67. extern ssize_t flistxattr (int __filedes, char *__list,
  68.                 size_t __size) __THROW;
  69.  
  70. extern int removexattr (const char *__path, const char *__name) __THROW;
  71. extern int lremovexattr (const char *__path, const char *__name) __THROW;
  72. extern int fremovexattr (int __filedes,   const char *__name) __THROW;
  73.  
  74. __END_DECLS
  75.  
  76. #endif    /* __XATTR_H__ */
  77.